import com.jfinal.kit.HttpKit;
import com.lsk.util.AES;

/**
 * Created by Administrator on 2018/10/5.
 */
public class 创建微信菜单 {
    public static void main(String[] strings){
        String url="http://127.0.0.1/weixin/createMenu";
        String content="{\n" +
                "\t\"button\": [{\n" +
                "\t\t\t\"name\": \"项目介绍\",\n" +
                "\t\t\t\"sub_button\": [{\n" +
                "\t\t\t\t\t\"type\": \"view\",\n" +
                "\t\t\t\t\t\"name\": \"标准版\",\n" +
                "\t\t\t\t\t\"url\": \"http://www.baidu.com\"\n" +
                "\t\t\t\t},\n" +
                "\t\t\t\t{\n" +
                "\t\t\t\t\t\"type\": \"view\",\n" +
                "\t\t\t\t\t\"name\": \"半年版\",\n" +
                "\t\t\t\t\t\"url\": \"http://www.baidu.com\"\n" +
                "\t\t\t\t},\n" +
                "\t\t\t\t{\n" +
                "\t\t\t\t\t\"type\": \"view\",\n" +
                "\t\t\t\t\t\"name\": \"加盟代理\",\n" +
                "\t\t\t\t\t\"url\": \"http://www.baidu.com\"\n" +
                "\t\t\t\t}\n" +
                "\t\t\t]\n" +
                "\t\t},\n" +
                "\t\t{\n" +
                "\t\t\t\"name\": \"关于我们\",\n" +
                "\t\t\t\"sub_button\": [{\n" +
                "\t\t\t\t\t\"type\": \"click\",\n" +
                "\t\t\t\t\t\"name\": \"联系电话\",\n" +
                "\t\t\t\t\t\"key\": \"lianxidianhua\"\n" +
                "\t\t\t\t},\n" +
                "\t\t\t\t{\n" +
                "\t\t\t\t\t\"type\": \"click\",\n" +
                "\t\t\t\t\t\"name\": \"定制开发\",\n" +
                "\t\t\t\t\t\"key\": \"dingzhikaifa\"\n" +
                "\t\t\t\t}\n" +
                "\t\t\t]\n" +
                "\t\t},\n" +
                "\t\t{\n" +
                "\t\t\t\"type\": \"scancode_push\",\n" +
                "\t\t\t\"name\": \"扫一扫\",\n" +
                "\t\t\t\"key\": \"saoyisao\"\n" +
                "\t\t}\n" +
                "\t]\n" +
                "}";
        content=AES.AESEncode(content);
        String result= HttpKit.get(url+"?content="+content);
        System.out.print(result);

    }
}
